<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>列表</title>
<script type="text/javascript" src="js/jquery-1.12.4.js"></script>
<script type="text/javascript">
    function bare(date){
    	var bi=confirm("确定要删除改考勤记录吗？");
    	if(bi==true){
    		$.getJSON("deteleSerlvet","id="+date,function nu(data){
    			if(data.count>0){
    				alert("删除成功");
    				location.href="ListgetServlet";
    			}else{
					alert("删除失败");
				}
    		});
    	}
    }
</script>
</head>
<body>
	<div style="width: 500px;">
	<table border="1">
		<tr>
			<th colspan="5" align="center" style="font-size: 20px; height: 50px;">考勤信息记录表</th>
		</tr>
		<tr>
			<th>员工姓名</th>
			<th>所属部门</th>
			<th>考勤日期</th>
			<th>考勤状态</th>
			<th>操作</th>
		</tr>
		<c:forEach items="${requestScope.list }" var="list">
			<tr>
				<td>${list.empName }</td>
				<td>${list.dept }</td>
				<td>${list.chkDate }</td>
				<td>${list.status }</td>
				<td><a href="javascript:bare(${list.id});">删除</a></td>
			</tr>
		</c:forEach>	
	</table>
	 <a href="addattence.jsp" style="text-align: right;">考勤登记</a>
	</div>
	<script type="text/javascript">
	$("tr:odd").css("background", "yellow")
	</script>
</body>
</html>